SouperPrediktor.m

A Package for Genetic Symbolic Regression

Bernard Gress

Fannie Mae

Introduction

SouperPrediktor is a Mathematica package that searches function space for functional fits to arbitrary data using genetic algorithm techniques.  The program provides a large variety of control parameters to allow the user to refine his search for the optimal functional form.  SouperPrediktor outputs detailed and insightful graphics that summarize the information content and evolution of the population of organisms, providing the user with the feedback necessary to guide his search.  SouperPrediktor introduces a number of important innovations:

SouperPrediktor outputs Mathematica expressions that can be used directly by the user in any other context.  This also allows the user to interpret the optimized function according to applicable theoretical models.  In this presentation I will demonstrate SouperPrediktor's interface and ability to search an infinite functional space for optimal functional fits to arbitrary functions.

Motivation

Econometrics has a backwards approach to the scientific method

Should be

Advantages of Symbolic Regression

Soup

Automatic identification of the useful variables
Outputs a relationship that can be interpreted from a theoretical point of view
Automated

Deterministic Functions vs. Probabilistic Functions

SouperPrediktor works with either

Find the combination of determinstic and probabilistic functions that best predicts the dataset

Out-of-Sample Prediction

GressTest

Leave-One-Out MSE doesn't necessarily correctly rank models:

True DGP is OLS3

Fitness Ordering

Production Theory - Input and Outputs

The Best Definition of Science and the Scientific Method - Occam's Razor and Friedman's Critique

Minimizing the complexity of the theory

-Whilst-

Maximizing the predictive ability of the theory

Pareto Frontier -

Pareto IsoQuants - the Pareto Non-dominated Sets

Data Envelopment Frontier -

Production Frontier

Distance from the frontier is the measure of fitness (smaller is better)
Which distance to use is arbitrary, I use to the closest frontier...

Only missing a cost function!

User Feedback

OrgFunctionPlot

OrgColorBarsPlot

Syntax

Fitting a Simple Integer Function

X[Integers] = 
      Transpose[
        Flatten[Table[{i, j, Random[Integer, {1, i + j}]}, {i, d}, {j, d}], 
          1]]; Dimensions[X[Integers]]
Y[Integers] = 
        Map[(Mod[#[[1]]*2, 3] + 
                Mod[#[[2]] + 3, 4] - 
                Mod[#[[2]], #[[3]]]) &, 
          Transpose[X[Integers]]];

({{ ,  }, {, }})

\(SouperPrediktor[X[Integers], Y[Integers], 10000, 10, 
      Debug -> False, TargetOutType -> Int, 
      NumberOfGenerationsToTrack -> 10, 
      NumberOfBestOrgsToTrack -> 30, MinimumBiteSize -> 8, 
      MaximumBiteSize -> 16, BiteSize -> 25, 
      MaxMemory -> 5000, MaximumMSE -> 2000, MaxTime -> 1, 
      GenerationZeroMaxDepth -> 6, MinimumPercentToDie -> 0.4, 
      NumberOfChromosomes -> 2, 
      MatingMethod -> "MixParameters", 
      GraphsToDisplay -> {"FrontierPlot", "OrgColorBars", "StatsPanel", "ComplexityPanel", "OrgFunctionPlot"}, 
      FitnessOrderingFunction -> "MinDistanceFromFrontier", 
      DataOutTypes -> {{Int, 1}, {Int, 1}, {Int, 1}}, 
      ParameterOutTypes -> {{Int, 0}, {Int, 0}, {Int, 0}, {Int, 1}}, 
      FunctionSet -> {{Subtract, {Int, 
              0}, {{Int, 0}, {Int, 0}}}, {Minus, {Int, 
              0}, {{Int, 0}}}, {Minus, {Int, 0}, {{Int, 0}}}, {Sum1, {Int, 
              0}, {{Int, 1}}}, {Plus, {Int, 
              0}, {{Int, 0}, {Int, 0}}}, {Plus, {Int, 
              0}, {{Int, 0}, {Int, 0}, {Int, 0}}}, {Plus, {Int, 
              1}, {{Int, 0}, {Int, 1}}}, {Plus, {Int, 
              1}, {{Int, 1}, {Int, 1}}}, {Times, {Int, 
              0}, {{Int, 0}, {Int, 0}}}, {Times, {Int, 
              1}, {{Int, 0}, {Int, 1}}}, {List, {Int, 
              1}, {{Int, 0}, {Int, 0}, {Int, 0}}}, {Length, {Int, 
              0}, {{Int, 1}}}, {Mod, {Int, 
              0}, {{Int, 0}, {Int, 0}}}, {Mod, {Int, 
              0}, {{Int, 0}, {Int, 0}, {Int, 0}}}}]\)